package com.zhiyun.test.demo.controller;

import com.zhiyun.test.base.controller.BaseController;
import com.zhiyun.test.base.util.PropUtil;
import com.zhiyun.test.base.util.StorageUtil;
import com.zhiyun.test.base.util.ThreadUtil;
import org.apache.log4j.Logger;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

/**
 * Created by user on 2019-5-27.
 */
public class HomeController extends BaseController{
  private Logger logger = Logger.getLogger(HomeController.class);
  @BeforeClass
  public void beforeClass(){
    super.beforeClass();
    webDriver.get(PropUtil.getProp("site.prop","url"));
    ThreadUtil.sleep(2);
    StorageUtil storageUtil = new StorageUtil(webDriver);
    storageUtil.setItemInSessionStorage("token",PropUtil.getProp("token.prop","token"));
    webDriver.get(PropUtil.getProp("site.prop","url"));
    ThreadUtil.sleep(2);
  }
  @Test
  public void index(){
    logger.info("测试token");
  }
}
